package cn.iocoder.yudao.module.vos.dal.mysql.activityfailednumbers;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.vos.dal.dataobject.activityfailednumbers.ActivityFailedNumbersDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.vos.controller.admin.activityfailednumbers.vo.*;

/**
 * 活动任务失败的具体名单号码信息 Mapper
 *
 * @author shijun
 */
@Mapper
public interface ActivityFailedNumbersMapper extends BaseMapperX<ActivityFailedNumbersDO> {

    default PageResult<ActivityFailedNumbersDO> selectPage(ActivityFailedNumbersPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ActivityFailedNumbersDO>()
                .eqIfPresent(ActivityFailedNumbersDO::getTaskId, reqVO.getTaskId())
                .eqIfPresent(ActivityFailedNumbersDO::getNumber, reqVO.getNumber())
                .eqIfPresent(ActivityFailedNumbersDO::getIndexs, reqVO.getIndexs())
                .eqIfPresent(ActivityFailedNumbersDO::getNumberMd5, reqVO.getNumberMd5())
                .eqIfPresent(ActivityFailedNumbersDO::getTag, reqVO.getTag())
                .eqIfPresent(ActivityFailedNumbersDO::getErrorMessage, reqVO.getErrorMessage())
                .betweenIfPresent(ActivityFailedNumbersDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ActivityFailedNumbersDO::getId));
    }

}